Weak Memory Models as LLVM-to-LLVM Transformations

نویسندگان

  • Vladimír Still
  • Petr Rockai
  • Jiri Barnat
چکیده

Data races are among the most difficult software bugs to discover. They arise from multiple threads accessing the same memory location, a situation which is often hard to discern from source code alone. Detection of such bugs is further complicated by individual CPUs’ use of relaxed memory models. As a matter of fact, proving absence of data races is a typical task for automated formal verification. In this paper, we present a new approach for verification of multi-threaded C and C++ programs under weakened memory models (using store buffer emulation), using an unmodified model checker that assumes Sequential Consistency. In our workflow, a C or C++ program is translated into LLVM bitcode, which is then automatically extended with store buffer emulation. After this transformation, the extended LLVM bitcode is model-checked against safety and/or liveness properties with our explicit-state model checker DIVINE.

برای دانلود رایگان متن کامل این مقاله و بیش از 32 میلیون مقاله دیگر ابتدا ثبت نام کنید

ثبت نام

اگر عضو سایت هستید لطفا وارد حساب کاربری خود شوید

منابع مشابه

Formalizing an Ssa-based Compiler for Verified Advanced Program Transformations

FORMALIZING AN SSA-BASED COMPILER FOR VERIFIED ADVANCED PROGRAMTRANSFORMATIONSJianzhou ZhaoSupervisor: Steve Zdancewic Compilers are not always correct due to the complexity of language semantics and transformation algo-rithms, the trade-offs between compilation speed and verifiability, etc. The bugs of compilers can underminethe source-level verification efforts (such a...

متن کامل

The LLVM Instruction Set and Compilation Strategy

This document introduces the LLVM compiler infrastructure and instruction set, a simple approach that enables sophisticated code transformations at link time, runtime, and in the field. It is a pragmatic approach to compilation, interfering with programmers and tools as little as possible, while still retaining extensive high-level information from source-level compilers for later stages of an ...

متن کامل

Lowering C11 Atomics for ARM in LLVM

This report explores the way LLVM generates the memory barriers needed to support the C11/C++11 atomics for ARM. I measure the influence of memory barriers on performance, and I show that in some cases LLVM generates too many barriers. By leaving these barriers out, performance increases significantly. I introduce two LLVM passes, which will remove these extra barriers, improving performance in...

متن کامل

Introducing Molly: Distributed Memory Parallelization with LLVM

Programming for distributed memory machines has always been a tedious task, but necessary because compilers have not been sufficiently able to optimize for such machines themselves. Molly is an extension to the LLVM compiler toolchain that is able to distribute and reorganize workload and data if the program is organized in statically determined loop control-flows. These are represented as poly...

متن کامل

Superoptimization in LLVM

Superoptimization is a known technique to integrate the analyses and transformations of a number of separate optimizations in order to obtain an optimization that is more expressive than the sequential and iterative application of the original optimizations. This paper describes the elaboration of this technique within the Low Level Virtual Machine (LLVM) Compiler Infrastructure. A framework su...

متن کامل

ذخیره در منابع من


  با ذخیره ی این منبع در منابع من، دسترسی به آن را برای استفاده های بعدی آسان تر کنید

عنوان ژورنال:

دوره   شماره 

صفحات  -

تاریخ انتشار 2015